package com.cskaoyan.mapper;

import com.cskaoyan.bo.wxorder.*;
import com.cskaoyan.vo.wxorder.OrderCommentInfoVo;
import com.cskaoyan.vo.wxorder.OrderDetailVo;
import com.cskaoyan.vo.wxorder.OrderListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WxOrderMapper {
    OrderAddressBo selectAddressInfo(@Param("aid") Integer addressId);

    List<OrderProductBo> selectCheckedProduct(@Param("uid") Integer userId, @Param("cartId") Integer cartId);

    int insertOrder(@Param("o") OrderInsertBo orderInsertBo);

    int insertOrderAndProduct(@Param("op") List<OrderProductBo> orderProductBoList, @Param("oid") Integer id);

    int deletedCheckedProduct(@Param("uid") Integer userId);

    List<OrderListVo.DataBean> selectOrder(@Param("status") Integer showType, @Param("userId") Integer userId);

    List<OrderListVo.DataBean.GoodsListBean> selectProductInfo(@Param("oid") int id);

    OrderDetailVo.OrderInfoBean selectOrderInfo(@Param("oid") Integer orderId);

    List<OrderDetailVo.OrderGoodsBean> selectGoodInfo(@Param("oid") Integer orderId);

    int deleteOrder(@Param("orderId") Integer orderId);

    int deleteOrderProduct(@Param("orderId") Integer orderId);

    int cancelOrder(@Param("orderId") Integer orderId);

    int insertComment(@Param("comment") CommentBo commentBo);

    int updateOrderGoodComment(@Param("orderGoodsId") int orderGoodsId, @Param("commentId") int id);

    int updateOrderRefund(@Param("orderId") Integer orderId);

    int updateOrderConfirm(@Param("orderId") Integer orderId);

    OrderCommentInfoVo selectGoodCommentInfo(@Param("oid") Integer orderId, @Param("gid") Integer goodsId);

    int selectOrderId(@Param("orderGoodsId") int orderGoodsId);

    int selectCommentNum(@Param("orderId") int orderId);

    int updateOrderStatus(@Param("orderId") int orderId, @Param("commentNum") int commentNum);

    int selectProductNum(@Param("productId") Integer productId);

    List<OrderCancelBo> selectOrderCancelInfo(@Param("orderId") Integer orderId);


    int updateProductStock(@Param("bo") OrderCancelBo bo);
}
